import App from './App'

import store from './store'

// #ifndef VUE3
import Vue from 'vue'
Vue.config.productionTip = false
App.mpType = 'app'

// 注册工具包
import tools from "@/utils/tools.js";
Vue.use(tools);
// 注册分享
import share from "@/utils/share.js"
Vue.mixin(share)

import {
	router,
	RouterMount
} from './router.js' //路径换成自己的
Vue.use(router)

const app = new Vue({
	store,
    ...App,
	share
})
// #ifdef H5
	RouterMount(app,router,'#app')
// #endif
// #ifndef H5
	app.$mount(); //为了兼容小程序及app端必须这样写才有效果
// #endif

// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif